[ToC] [Up] [Back] [Next] ... [Book Plug] The Information Commons
.................... Introduction to HTML

7.2 FONT Element

Netscape introduced the FONT element to permit control of the size of the displayed font, when possible. Font sizes are defined in a range from 1 to 7 (the default base value, or basefont, is 3). YOu can then specify a change in font size using elements such as
    <P> This is <FONT SIZE=+2>resized</FONT> text.   <BR>
        This is <FONT SIZE=-2>resized</FONT> text.   <BR>
        This is <FONT SIZE=7>resized</FONT> text.   <BR>

which is rendered as:

This is resized text.
This is resized text.
This is resized text.


Thus you can specify the font size relative to the current size (using + or -) or as an absolute size from 1 to 7.

7.2.1 Microsoft Attribute Enhancement

Microsoft browser support a new attribute FACE, for specifying the typeface. For example "FACE="arial" would specify an arial font. This is only supported by Microsoft. The face names are taken from the Windows font manager, so you need to know the font names and have the fonts installed for this to work. Clearly this will only work on PCs, and will not work on Macs or Unix computers. Here is an example:
    <P> This is <FONT FACE="arial">resized</FONT> text.   <BR>
        This is <FONT FACE="times">resized</FONT> text.   <BR>
        This is <FONT FACE="zapf">resized</FONT> text.   

which is rendered as:

This is resized text.
This is resized text.
This is resized text.


[ToC] [Up] [Back] [Next] ... [Book Plug] .................... Introduction to HTML

© Ian Graham 1994-1995 Page Last Updated: 4 December 1995